function loadinPluginInit(picSrc) {
    var popBox =
        '<div class="pop_box"><div class="shade"></div><div class="pop_pic"><img src="" alt=""></div></div>'
    $("body").append(popBox);
    $('.pop_box').css({
        display: 'none',
        position: 'fixed',
        top: 0,
        width: '100%',
        height: '100%',
        zIndex: 999
    })
    $('.shade').css({
        opacity: 0.4,
        width: '100%',
        height: '100%',
        backgroundColor: '#ccc',
    })
    $('.pop_pic').css({
        overflow: 'hidden',
        position: 'absolute',
        top: '50%',
        left: '50%',
        width: '140px',
        height: '140px',
        backgroundColor: '#000',
        borderRadius: '6px',
        transform: 'translate(-50%, -50%)',
        zIndex: 9999
    })
    $('.pop_pic img').css({
        marginLeft: '-23px',
        height: '100%'
    }).attr('src', picSrc)
}
loadinPluginInit('./plugins/popup/img/loadin.gif')

 

//依赖 jQuery
//弹窗一
function loadin(flag) {
    // flag = true  开启等待动画
    if (flag) {
        $('.pop_box').css({
            'display': 'block'
        })
    } else {
        $('.pop_box').css({
            'display': 'none'
        })
    }
}

